<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../static/knockout-3.3.0.js"></script>
</head>
<body>
	this is so
	<span data-bind="text:priceRating"></span>

	<button value="changePrice" onclick="changePrice()"></button>
</body>

<script type="text/javascript">
	var viewModel = {
		price : ko.observable(21)
	}
	viewModel.priceRating = ko.computed(function() {
		return this.price() > 50 ? "expensive" : "affordable";
	}, viewModel);

	function changePrice() {
		viewModel.price(100);
	}
	ko.applyBindings(viewModel);
</script>

</html>